public class Thread_join implements Runnable{
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println("vip");
        }
    }

    public static void main(String[] args) throws InterruptedException {
        Thread_join t1 = new Thread_join();
        Thread thread = new Thread(t1);
        thread.start();
        for (int i = 0; i < 20; i++) {
            if (i == 10){
                thread.join();
            }
            System.out.println("main"+i);
        }
    }
}
